package io.kwdb.examples;

import io.kwdb.sdk.*;

public class TestIlpEncoder {
  public static void main(String[] args) {
    IlpEncoder encoder = new IlpEncoder();

    Point point =
        Point.builder("sdk_bench")
            .tag("host", "test-host")
            .tag("region", "us-west")
            .field("usage", 65.5)
            .timestamp(1234567890000000000L)
            .build();

    String ilpLine = encoder.encode(point);
    System.out.println("Generated ILP line:");
    System.out.println(ilpLine);

    // Test without timestamp
    Point point2 =
        Point.builder("sdk_bench")
            .tag("host", "test-host-2")
            .tag("region", "us-east")
            .field("usage", 0.75)
            .build();

    String ilpLine2 = encoder.encode(point2);
    System.out.println("\nGenerated ILP line without timestamp:");
    System.out.println(ilpLine2);
  }
}
